﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EulerNo6
{
    class Program
    {
        static void Main(string[] args)
        {
            int squareOfSum = 0;
            int sumOfSquare = 0;
            for (int i = 100; i > 0; i--)
            {
                squareOfSum += i;
                sumOfSquare += (int)Math.Pow(i,2);
            }
            squareOfSum = (int)Math.Pow(squareOfSum,2);

            Console.WriteLine("Square of sum - Sum of square: " + (squareOfSum - sumOfSquare).ToString());
            Console.ReadLine();
        }
    }
}
